<template>
  <view class="my-manor-edit">
    <view class="edit-wrap cbox">
      <view class="title">庄园信息</view>
      <view class="edit-list cbox">
        <view
          class="item rbox box_y_center"
          v-for="(item, idx) in editList"
          :key="idx"
        >
          <text class="tit">{{ item.name }}</text>
          <input type="text" class="edit" />
        </view>
      </view>
    </view>

    <view
      class="single-btn btn-normal rbox box_center btn-position"
      @tap="goPage('myManorShow')"
    >
      确认信息
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      editList: [
        { name: '庄园名称：' },
        { name: '园区面积：' },
        { name: '发生过的灾害：' },
        { name: '葡萄品种：' },
        { name: '用药次数：' },
        { name: '庄园地址：' },
        { name: '手机号码：' }
      ]
    }
  },
  methods: {
    goPage(url) {
      if (url) {
        wx.navigateTo({
          url: `/pages/${url}/${url}`
        })
      }
    },
  }
}
</script>

<style lang="scss" scoped>
.my-manor-edit {
  padding: 40rpx 42rpx 0;
  min-height: 100vh;
  background-color: #f7f7f7;
  .edit-wrap {
    padding: 0 10rpx 66rpx;
    background: #ffffff;
    box-shadow: 0px 0px 6rpx rgba(0, 0, 0, 0.16);
    border-radius: 30rpx;
    .title {
      padding: 28rpx 30rpx;
      font-size: 34rpx;
      line-height: 1;
      color: #5a5a5a;
      border-bottom: 1rpx solid #e9e8e8;
    }
    .edit-list {
      padding: 0 30rpx;
      margin-top: 20rpx;
      .item {
        &:not(:first-child) {
          margin-top: 20rpx;
        }
        .tit {
          min-width: 8em;
          font-size: 26rpx;
          line-height: 1;
          color: #b5b5b5;
        }
        .edit {
          padding: 0 10rpx;
          margin-left: 50rpx;
          width: 400rpx;
          height: 60rpx;
          background: #ffffff;
          border: 1rpx solid #c9c9c9;
          border-radius: 20rpx;
        }
      }
    }
  }
}
</style>